//------------------------------------------------------------------------------
//  VertexLayout.cpp
//  (C) 2009 xoyojank
//------------------------------------------------------------------------------
#include "StdEddy.h"
#include "Graphics/VertexLayout.h"

//------------------------------------------------------------------------------
namespace Eddy
{

//------------------------------------------------------------------------------
VertexLayout::VertexLayout(const std::vector<VertexElement>& e)
{
    assert(!e.empty());

    this->elements = e;
    this->vertexSize = 0;
    for (std::vector<VertexElement>::iterator it = this->elements.begin();
            it != this->elements.end(); ++it)
    {
        const VertexElement& element = *it;
        this->vertexSize += element.GetByteSize();
    }
}

}// Eddy
